<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        function delcfm(){
            if(!confirm("确认要删除？")){
                window.event.returnValue=false;
            }
        }
    </script>
</head>
<body>
<div>
    <a href="/user/form" th:href="@{/user/form}">新增用户</a>
</div>
<table border="1">
    <thead>
    <tr>
        <td>id</td>
        <td>姓名</td>
        <td>证件号</td>
        <td>管理</td>
    </tr>
    </thead>
    <tr th:each="user : ${contents}">
        <td th:text="${user.id}"></td>
        <td th:text="${user.psname}"></td>
        <td><a th:href="@{'/user/'+${user.id}}" th:text="${user.cardno}"></a></td>
        <td><a th:href="@{'/user/delete/'+${user.id}}" onclick="delcfm()">删除</a></td>
    </tr>
</table>
</body>
</html>